Conventionally, there is known a method in which, when an AC motor is driven by an inverter, each phase current of the AC motor is detected from a DC input current of the inverter (see, for example, PTL 1 and PTL 2). In PTL 1 and PTL 2, it is disclosed that three carrier waves, each pair of which has a fixed phase difference, are generated, and PWM signals are generated by comparing the carrier waves with phase voltage commands. When the three carrier waves are used in this way, each phase current can be surely detected, since this way can prevent the rising edges of the PWM signals of respective phases from being close to each other and the pulse width for current detection from being reduced.